package com.feel.common.constant.enums;

/**
 * 工单类型枚举类
 * @author wang.yuehuai
 */
public enum WorkOrderDelStatusEnum {


    DEL_STATUS_1(0, "有效"),
    DEL_STATUS_2(1, "删除"),
    ;
    private int code;
    private String message;

    WorkOrderDelStatusEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public static WorkOrderDelStatusEnum stateOf(int index) {
        for (WorkOrderDelStatusEnum code : values()) {
            if (code.getCode() == index) {
                return code;
            }
        }
        return null;
    }
}
